<template>
  <ul class="database-view">
    <li>
      <div class="circle-border">
        <img src="/public/image/Mydatabase/database.png" alt="">
      </div>
      <div class="text">
        <p>数据库</p>
        <p>25</p>
      </div>
    </li>
    <li>
      <div class="circle-border">
        <img src="/public/image/Mydatabase/datasheet.png" alt="">
      </div>
      <div class="text">
        <p>数据表</p>
        <p>400</p>
      </div>
    </li>
    <li>
      <div class="circle-border">
        <img src="/public/image/Mydatabase/datacolumns.png" alt="">
      </div>
      <div class="text">
        <p>数据列</p>
        <p>5560</p>
      </div>
    </li>
    <li>
      <div class="circle-border">
        <img src="/public/image/Mydatabase/file.png" alt="">
      </div>
      <div class="text">
        <p>文件 </p>
        <p>560</p>
      </div>
    </li>
    <li class="flex-column">
      <p>敏感数据内容</p>
      <div class="content-wrap">
        <div class="circle-border">
          <img src="/public/image/Mydatabase/sensitive.png" alt="">
        </div>
        <p class="number">664</p>
      </div>
    </li>
    <li class="flex-column">
      <p class="title">敏感库占比</p>
      <div class="content-wrap">
        <img class="pie-chart rotate" src="/public/image/Mydatabase/piechart_list.png" alt="">
        <p class="number active">15%</p>
      </div>
    </li>
    <li class="flex-column">
      <p class="title">敏感表占比</p>
      <div class="content-wrap">
        <img class="pie-chart" src="/public/image/Mydatabase/piechart_list2.png" alt="">
        <p class="number active">20%</p>
      </div>
    </li>
    <li class="flex-column">
      <p class="title">敏感文件占比</p>
      <div class="content-wrap">
        <img class="pie-chart" src="/public/image/Mydatabase/piechart.png" alt="">
        <p class="number active">40%</p>
      </div>
    </li>
  </ul>
</template>

<style scoped lang="scss">
.database-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: .25rem .0625rem;

  li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    padding: .25rem .025rem;
    box-sizing: border-box;
    font-size: .15rem;

    .circle-border {
      display: flex;
      align-items: center;
      justify-content: center;
      width: .65rem;
      height: .65rem;
      border: .025rem dashed #337ecc;
      border-radius: 50%;
      padding: 0 .0625rem;
    }

    img {
      width: .5625rem;
      height: .5625rem;
    }


    p {
      text-align: center;
      white-space: nowrap;
      padding: 0 0 0 .0625rem;
      box-sizing: border-box;
    }

    .content-wrap {
      display: flex;
      padding: .125rem 0 0 0;

      .number {
        margin: .125rem 0 0 0;
        z-index: 10;
      }

      .number.active {
        // margin: .125rem 0 0 -0.0125rem;
        padding: 0;
      }
    }
  }

  li.flex-column {
    flex-direction: column;

    .title {
      padding: 0;
    }

    .pie-chart {
      width: .65rem;
      height: .65rem;
    }
  }

  li:nth-child(6) {
    img {
      -moz-transform: rotate(97deg);
      -webkit-transform: rotate(97deg);
    }
  }
  li:nth-child(7) {
    img {
      -moz-transform: rotate(105deg);
      -webkit-transform: rotate(105deg);
    }
  }
  li:nth-child(8) {
    img {
      -moz-transform: rotate(150deg);
      -webkit-transform: rotate(150deg);
    }
  }
}

@media screen and (min-width:1920px) {
  .circle-border {
    width: .75rem !important;
    height: .75rem !important;
  }

  .pie-chart {
    width: .75rem !important;
    height: .75rem !important;
  }
}

span {
  padding-top: .15rem;
  padding-left: .0375rem;
  color: white;
}
</style>
